#include <math.h>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>

using namespace std; 

template<typename T>
T mymin(T a, T b)
{
	return a < b ? a : b; 
}

template<typename T>
T mymax(T a, T b)
{
	return a < b ? b : a;
}

double solveNaive(const vector<double> & a, const vector<double>& b)
{
	double mindsq = (double)(40000 * 40000 * 3);
	for (long long i = 0; i < a.size(); ++i)
	{
		for (long long j = i + 1; j < a.size(); ++j)
		{
			mindsq = mymin(mindsq, (double)((a[i] - a[j]) * (a[i] - a[j]) + (b[i] - b[j]) * (b[i] - b[j])));
		}
	}
	return sqrt(mindsq);
}

double solve(const vector<double>& cox, const vector<double>& coy)
{
	double minx = 40001, maxx = -1, miny = 40001, maxy = -1;
	
	for (long long i = 0; i < cox.size(); ++i)
	{
		minx = mymin(minx, cox[i]);
		maxx = mymax(maxx, cox[i]);
		miny = mymin(miny, coy[i]);
		maxy = mymax(maxy, coy[i]);
	}

	if (cox.size() < 20 || (maxx - minx) * (maxy - miny) < 100 ) 
	{
		return solveNaive(cox, coy);
	}
	
	vector<double> m = cox; vector<double> n = coy; 
	if (maxy - miny > maxx - minx) 
	{
		swap(m, n);
		swap(maxy, maxx);
		swap(minx, miny);
	}

	vector<double> ax[3], ay[3]; 
	
	for (long long i = 0; i < m.size(); ++i)
	{
		if (m[i] <= minx + (maxx - minx) / 2) 
		{
			ax[0].push_back(m[i]);
			ay[0].push_back(n[i]);
		}
		else //  m[i] > minx + (maxx - minx) / 2
		{
			ax[2].push_back(m[i]);
			ay[2].push_back(n[i]);
		}

		// redundant
		if (m[i] >= minx + (maxx - minx) / 4 && m[i] <= maxx - (maxx - minx) / 4)
		{
			ax[1].push_back(m[i]);
			ay[1].push_back(n[i]);
		}
	}

	double mindsq = sqrt(40000.0 * 40000.0 * 3.0);
	for (long long i = 0; i < 3; ++i)
	{
		if (ax[i].size() > 1)
		{
			mindsq = mymin(mindsq, solve(ax[i], ay[i]));
		}
	}
	return mindsq;
}

long long run()
{
	long long curn = 0; 
	while (cin >> curn)
	{
		if (curn == 0)
			break;
		vector<double> cox(curn), coy(curn);
		for (long long i = 0; i < curn; ++i)
		{
			double x, y; 
			cin >> x >> y; 
			cox[i] = x; coy[i] = y;
		}
		double res = 0.0;
		if (curn > 1 && ((res = solve(cox, coy)) < 10000.0))
		{
			// cout << setprecision(4) << res;
			printf("%.4f\n", res);
		}
		else 
		{
			cout << "INFINITY" << endl;
		}
	}
	return 0;
}

#ifdef _LOCAL_
#include <time.h>
#include <stdlib.h>
#include <fstream>

double eps = 1e-7;

void readTestCase(const string& filename, vector<double>& a, vector<double>& b)
{
	ifstream ifs(filename.c_str(), ifstream::in);

	long long n ; 
	ifs >> n; 
	a.resize(n), b.resize(n);
	for (long long i = 0; i < n; ++i)
	{
		ifs >> a[i] >> b[i];
	}
	ifs.close();
}
#endif


int main()
{
#ifndef _LOCAL_
	run();
#else 
#ifdef AAA
	// 
	while (true)
	{
		// generate test cases
		srand(time(NULL));
		long long n = rand();

		vector<double> a, b;
		for (long long j = 0; j < n; ++j)
		{
			a.push_back(rand() % 40000);
			b.push_back(rand() % 40000);
		}

		double a1 = solve(a, b);
		double a2 = solveNaive(a, b);

		if (a1 - a2 > eps || a1 - a2 < -eps)
		{
			cout << "error !!! " << endl; 
			cout << n << endl; 
			for (long long l = 0; l < a.size(); ++l)
			{
				cout << a[l] << ' ' << b[l] << endl;
			}
			break;
		}
		else 
		{
			cout << "OK" << endl;
		}
	}
#endif
#ifdef BBB
	system("pause");
	vector<double> a, b; 
	readTestCase("10245.txt", a, b);
	double res1 = solve(a, b);
	double res2 = solveNaive(a, b);
#endif

#endif
}